package com.threadpool.mythread.case01;

import java.util.function.Consumer;

/**
 * @Author 李李李
 * @2020/4/26 21:18
 *
 *消费者接口 只有一个输入参数 没有返回值
 *
 */
public class Case13 {
    public static void main(String[] args) {
        Consumer<String> consumer = new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println("消费了"+s);
            }
        };

        Consumer<String> consumer3 = str->{
            System.out.println("消费了"+str);
        };


        consumer3.accept("不说");
        consumer.accept("lalla");
    }
}
